<div th:fragment="footer" xmlns:th="http://www.thymeleaf.org">
    <footer class="footer bg-white">

        <div class="footer-meta">
            <div class="footer-container">
                <div class="meta-item meta-copyright">
                    <div class="meta-copyright-info">
                        <a th:href="@{/}" class="info-logo">
                            <img th:src="@{/ui/pages/img/logo.png}"  />
                        </a>
                        <div class="info-text">
                            <p>一生必须有所追求.</p>
                            <p>Powered by <a href="https://github.com/otale/tale" target="_blank" rel="nofollow">Tale</a>
                            </p>
                            <p>&copy; 2017 <a href="http://git.oschina.net/oneper/base/tree/dev/">hongb</a></p>
                        </div>
                    </div>
                </div>

                <div class="meta-item meta-posts">
                    <h3 class="meta-title">最新文章</h3>
                    <div id="recentdiv">

                    </div>


                </div>

                <div class="meta-item meta-comments">
                    <h3 class="meta-title">人生格言</h3>
                    <li>
                        <a href="#">大多数的人一辈子只做了三件事：自欺、欺人、被人欺。</a>
                    </li>
                    <li>
                        <a href="#">心是最大的骗子，别人能骗你一时，而它却会骗你一辈子。</a>
                    </li>
                    <li>
                        <a href="#">放弃时间的人，时间也会放弃他。</a>
                    </li>
                    <li>
                        <a href="#">你希望掌握永恒，那你必须控制现在。</a>
                    </li>
                </div>
            </div>
        </div>
    </footer>

    <script src="//cdn.bootcss.com/headroom/0.9.1/headroom.min.js"></script>
    <script src="//cdn.bootcss.com/highlight.js/9.9.0/highlight.min.js"></script>
    <script src="//cdn.bootcss.com/instantclick/3.0.1/instantclick.min.js"></script>
    <script type="text/javascript" th:inline="javascript">
        /*<![CDATA[*/


        $(function () {
            $.get(basepath+'/pages/re_articles',function (data) {
                var re_articles = data.data.data;

                console.info(re_articles);
                $.each(re_articles,function (i,v) {
                    console.info(v.id);
                   var li = "<li><a href='"+basepath+"/pages/article/"+v.id+"'>"+v.title+"</a></li>";
                   $("#recentdiv").append(li);
                });

            });
        });


        var header = new Headroom(document.getElementById("header"), {
            tolerance: 10,
            offset : 80,
            classes: {
                initial: "animated",
                pinned: "slideDown",
                unpinned: "slideUp"
            }
        });
        header.init();
        $('#search-inp').keypress(function (e) {
            var key = e.which; //e.which是按键的值
            if (key == 13) {
                var q = $(this).val();
                if (q && q != '') {
                    window.location.href = basepath+'/pages/search/' + q;
                }
            }
        });
        /*]]>*/
    </script>

    <script>
        /*<![CDATA[*/
        InstantClick.on('change', function (isInitialLoad) {
            var blocks = document.querySelectorAll('pre code');
            for (var i = 0; i < blocks.length; i++) {
                hljs.highlightBlock(blocks[i]);
            }
            if (isInitialLoad === false) {
                if (typeof ga !== 'undefined') ga('send', 'pageview', location.pathname + location.search);
            }
        });
        InstantClick.init();
        /*]]>*/
    </script>
</div>